from multiprocessing import Process
import time
import os


x = 100


def change():
    global x
    x = 10
    print('子进程修改了x, 子进程结束了！')

ß
# 子进程未修改X
if __name__ == '__main__':
    p = Process(target=change)
    p.start()
    # time.sleep(5)
    p.join()
    print(x)


